package com.rop.znyx.search.repository;

import com.rop.znyx.model.search.SkuEs;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * Created with IntelliJ IDEA
 * User: Rop
 * Date: 2023/6/30
 * Time: 17:50
 * Description:
 */
public interface SkuEsRepository extends ElasticsearchRepository<SkuEs,Long> {
    Page<SkuEs> findByOrderByHotScoreDesc(Pageable pageable);

    Page<SkuEs> findByCategoryIdAndWareId(Long categoryId, Long wareId, Pageable page);

    Page<SkuEs> findByKeywordAndWareId(String keyword, Long wareId, Pageable page);
}
